import os
import pandas as pd
import oracledb
import logging
from datetime import datetime
import time

dsn = oracledb.makedsn('8.141.85.230', 1521, service_name='orcl')
connection = oracledb.connect(user='dyyy', password='cpt123', dsn=dsn)
cursor = connection.cursor()
sql = """
select *
from 数据源 where rownum<=200
"""
df = pd.read_sql(sql, connection)
df.to_excel('数据源.xlsx', index=False)
